package cn.edu.sjtu.se.dslab.component.design.generate.element;

import java.util.Map;

public class Rectangle extends PageElement {
	
	public static final String RECT_X_COORDINATE = "rect_x_coordinate";
	public static final String RECT_Y_COORDINATE = "rect_y_coordinate";
	public static final String RECT_WIDTH = "rect_width";
	public static final String RECT_HEIGHT = "rect_height";

	private int rectXCoordinate;
	private int rectYCoordinate;
	private int rectWidth;
	private int rectHeight;

	public Rectangle(Map<String, String> elementMap) {
		super.setElementName(elementMap.get(ELEMENT_NAME));
		super.setElementType(ElementType.valueOf(elementMap.get(ELEMENT_TYPE).toUpperCase()));
		rectXCoordinate = Integer.parseInt(elementMap.get(RECT_X_COORDINATE));
		rectYCoordinate = Integer.parseInt(elementMap.get(RECT_Y_COORDINATE));
		rectWidth = Integer.parseInt(elementMap.get(RECT_WIDTH));
		rectHeight = Integer.parseInt(elementMap.get(RECT_HEIGHT));
	}
	

	public int getRectXCoordinate() {
		return rectXCoordinate;
	}

	public void setRectXCoordinate(int rectXCoordinate) {
		this.rectXCoordinate = rectXCoordinate;
	}

	public int getRectYCoordinate() {
		return rectYCoordinate;
	}

	public void setRectYCoordinate(int rectYCoordinate) {
		this.rectYCoordinate = rectYCoordinate;
	}


	public int getRectWidth() {
		return rectWidth;
	}


	public void setRectWidth(int rectWidth) {
		this.rectWidth = rectWidth;
	}


	public int getRectHeight() {
		return rectHeight;
	}


	public void setRectHeight(int rectHeight) {
		this.rectHeight = rectHeight;
	}


}
